﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Windows.Storage;
using Windows.Storage.Streams;
using com.IronOne.BoardPACWinAppBO.Agenda;
using com.IronOne.BoardPACWinAppBO.General;
using com.IronOne.BoardPACWinAppBO.Meeting;
using com.IronOne.BoardPACWinAppBO.Paper;
using com.IronOne.BoardPACWinAppUtil.Enums;

namespace com.IronOne.BoardPACWinAppDAO.Agenda
{
    public interface IAgendaDAO
    {
        Task<PaperModel> GetPaperById(int paperId = 0);
        Task<List<PaperModel>> GetPapersToDownload();
        Task<List<PaperModel>> GetAnnotationFilesToDownload();
        Task<IBuffer> ReadPdfDocument(PaperModel paperModel, int currentMemberId = 0);
        Task<MemberModel> GetMemberDetailsById(string memId);
        Task<List<MemberModel>> GetParticipantsListForMeeting(int meetingId);
        Task<List<MemberModel>> GetParticipantsListForMeetingWithApprovalStatus(int paperId);
        Task<List<AgendaItem>> GetAgenda(int meetingId);
        Task<ResponseDataModel> WriteIndividualPartcipStatusToLogTable(LogDataModel ldm);
        Task<ResponseDataModel> WriteMemberAttendanceToLogTable(LogDataModel ldm);
        Task<LogDataModel> GetIndividualPartcipStatusFromLogTable(int meetingId);
        Task<String> GetAprovalOptions(int meetingOrCircular);
        Task<bool> AddPaperApprovals(string action, string comment, int paperId);
        Task<Tuple<int, bool>> GetAgendaItemApproval(int paperId);
        Task<NewsAndSharedDocModel> GetNewsAndSharedDocsList();
        Task<IBuffer> GetNewsSharedDocPdfDocument(PaperModel globalSelectdItem);
        Task<IBuffer> GetPastPaperPdfDocument(PaperModel globalSelectdItem);
        Task<bool> CheckFileExistOnPdfFolder(int paperId, int versionId);
        Task<bool> CheckAnnotationFileExistOnReceivedFolder(int paperId, int versionId, int annotationShareId);
        Task<bool> CheckRestoreAnnotationFileExistOnOriginalFolder(int paperId, int versionId);
        Task<bool> UpdatePaperPresentStatus(int meetingId, int paperId);
        Task<AgendaModel> GetSelectedCategoryAndSubCategory(int categoryId, int subCategoryId);
        Task<bool> UpdateViewedPaper(int memberId, int paperId, int versionId);
        Task<ResponseDataModel> UploadAnnotation(List<MemberModel> selectedList, AgendaItem globalSelectdAgendaItem);
        Task<bool> SaveBookmarks(Dictionary<int, string> bookmarks, string fileName);
        Task<Dictionary<int, string>> LoadBookmarks(string fileName);
        Task<StorageFile> GetEmailReadyPaper(string paperName);
        Task<List<PaperModel>> GetPaperVersionsByPaperId(int paperId, int versionId);
        Task<PaperModel> GetOriginalPaperVersionByPaperId(int paperId);
        Task<List<PaperModel>> GetPaperVersionSentByUser(int paperId);
        Task<List<PaperModel>> GetPaperVersionReceivedByUser(int paperId);
        Task<bool> UpdateIsAnnotBackupNeededOnVersionTable(int paperId, int versionId, int currentPage, bool isBackupNeeded);
        Task<string[]> GetAnnotationBackupDates();

        Task<int> GetCurrentPageOfThePaper(int paperId, int versionId);

        Task<List<PaperModel>> GetBackupNeededAnnotationsList();
        Task<bool> SetAnnotationBackupDates();

        Task<int> GetPendingApprovalsPapersList(int days);
    }
}